﻿using System;
using System.Windows.Media.Imaging;
using System.Collections.Generic;
using Petra.Gis.Imaging.Tiff;


namespace Petra.Gis.Geometry.Image
{
  public class ImageBlock
  {
    object _block;


    public ImageBlock(object block)
    { 
      _block = block;
    }


    public BitmapSource Source 
    {
      get
      {
        if (_block.GetType() == typeof(ContigousBitmapBlock) || _block.GetType() == typeof(SeparatedBitmapBlock))
          return ((BitmapBlock)_block).Source;
        else
          return (BitmapFrame)_block;
      }
    
    }

  }
}
